sub

pure function sub(start: integer): byte_array

Returns a sub-array of this byte array starting from the specified index (inclusive).

Since

0.6.0

Parameters

start

the start index of the sub-array

Throws

exception

if the start index is out of range


pure function sub(start: integer, end: integer): byte_array

Returns a sub-array of this byte array from the specified start index (inclusive) to the specified end index (exclusive).

Since

0.6.0

Parameters

start

the start index of the sub-array

end

the end index of the sub-array

Throws

exception

when:

  • the start or end indexes are out of range

  • the start index is greater than the end index